package com.zxh.blog.service.impl;

import com.zxh.blog.dao.CommentDao;
import com.zxh.blog.domain.Comment;
import com.zxh.blog.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

	@Autowired
	CommentDao commentDao;

	public List<Comment> selectByList() {
		List<Comment> commentList = commentDao.selectByList();
		return commentList;
	}

	public void batchDelete(int[] ids) {
		commentDao.batchDelete(ids);
	}

	public void updateCommCent(Comment comment) {
		commentDao.update(comment);
	}

	public Integer addComment(Comment comment) {
		Integer save = commentDao.save(comment);
		return save;
	}
}
